package shop.local.domain.sort;

import java.util.Comparator;

import shop.local.valueobjects.Produkt;

public class SortierenNachProdukttitelComparator implements Comparator<Produkt> {

	@Override
	public int compare(Produkt a, Produkt b) {
		if (a.getTitel().compareToIgnoreCase(b.getTitel()) < 0)
			return -1;
		else if (a.getTitel().compareToIgnoreCase(b.getTitel()) == 0)
			return 0;
		return 1;
	}

}
